package org.doubango.ngn.h264

import org.doubango.ngn.media.NgnProxyVideoProducer
import java.nio.ByteBuffer

@Suppress("SpellCheckingInspection")
class H264DoubangoSender(val producer: NgnProxyVideoProducer) {

    private val mByteBuffer: ByteBuffer = ByteBuffer.allocateDirect(producer.videoWidth * producer.videoHeight * 3 shr 1)

    fun sendH264Datas(datas: ByteArray) {
        mByteBuffer.put(datas)
        producer.proxyVideoProducer.push(mByteBuffer, datas.size.toLong())
        mByteBuffer.rewind()
    }

    fun close() {

    }
}